Digital imaging systems or digital cameras have quickly become a popular consumer electronic device and have become a standard feature of portable multi-function devices including for example, portable multimedia players, laptop computers, smart phones, and tablet computers. The image quality expected from these devices has grown as higher quality and higher megapixel cameras have been incorporated into them. The image quality of an imaging system can vary depending on many factors, including the lens focus position along the optical axis of the imager. In general, a well-focused camera produces a sharp image and a poorly focused camera produces a blurry image. Thus, it is important to be able to place a camera lens at a well-focused or in-focus lens position. For fixed focal length imaging systems, the in-focus lens position is found and then fixed at the time of manufacture or assembly. As such, for high volume mass production of such cameras, there is a need to find the in-focus lens position quickly and efficiently because this can increase the number of units per hour that may be produced, yielding a production capacity advantage.
Finding an in-focus lens position usually involves measuring and comparing the image quality (e.g., sharpness) of images of a test target captured at several different lens positions. It is common practice to calculate Spatial Frequency Response (SFR) or Modulation Transfer Function (MTF) to measure the sharpness of a given image and thereby determine an in-focus position of a lens during camera module production. The computation costs for these measurements are expensive, and it is difficult to determine an in-focus position using SFR or MTF as an image quality metric from a small number of captured frames. This makes SFR and MTF based techniques impractical for fast lens focus setting of mass produced imaging systems.